# cmake needs this line
cmake_minimum_required(VERSION 3.0)
# 声明cmake要求的最低版本

set(PROJECT_NAME "cv_demo")
# 设置PROJECT_NAME的值，方便批量修改工程名

set(CMAKE_BUILD_TYPE "Release")
# 设置编译类型

project(${PROJECT_NAME})
# 引用PROJECT_NAME，设置工程名

find_package(OpenCV REQUIRED)
# 搜索OpenCV库

include_directories(${OpenCV_INCLUDE_DIRS})
# 添加opencv路径

message(STATUS "OpenCV library status:")
message(STATUS "    config: ${OpenCV_DIR}")
message(STATUS "    version: ${OpenCV_VERSION}")
message(STATUS "    libraries: ${OpenCV_LIBS}")
message(STATUS "    include path: ${OpenCV_INCLUDE_DIRS}")
# 输出一些信息

add_compile_options(-std=c++11)
# 设置C++版本为C++11

add_executable(${PROJECT_NAME} main.cpp)
# 设置可执行文件对于的主函数所在文件（main函数所在文件）




target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS} )
add_library(cv_test SHARED cv_test.cpp)
target_link_libraries(${PROJECT_NAME} cv_test )
# 链接主函数和opencv库
